package com.pdg.android.russianroulette;

import com.pdg.android.common.State;

public class MainMenuState extends State<GameData,MainActivity,GameState>{

	public MainMenuState(GameData theData, MainActivity theMachine) {
		super(theData, theMachine, GameState.MAIN_MENU);
	}

	@Override
	protected void onInitialize() {
	}

	@Override
	protected void onEnter() {
		getMachine().setContentView(R.layout.main_menu);
	}

	@Override
	protected void onLeave() {
	}

	@Override
	protected void onCleanUp() {
	}

	@Override
	protected void onButtonPressed(int theButtonId) {
		switch(theButtonId){
		case R.id.button_about:
			getMachine().setCurrent(GameState.ABOUT);
			break;
		case R.id.button_instructions:
			getMachine().setCurrent(GameState.INSTRUCTIONS);
			break;
		case R.id.button_play:
			getData().newGame();
			getMachine().setCurrent(GameState.ROUND);
			break;
		case R.id.button_statistics:
			getMachine().setCurrent(GameState.STATISTICS);
			break;
		}
	}

}
